home *** CD-ROM | disk | FTP | other *** search
/ PowerQuest 2002 / PowerQuest 2002.iso / POWERQUEST / PQ ServerMagic 4.0 / DOCS / SCRIPTS / Do-While.pqs < prev    next >
Encoding:
Text File  |  2000-10-25  |  898 b   |  32 lines

  1. // PartitionMagic Script File
  2.  
  3. // This script file is an example of the Do-While script statement.
  4.  
  5. // Scenario:
  6. // Disk 1 contains a primary partition and an unknown number of logical 
  7. // partitions.
  8. //
  9. // The user wishes to take 10 MB of unused space on each logical partition and
  10. // add the unused space to the primary partition.
  11.  
  12. // Select the last partition
  13. Select Disk 1
  14. Select Partition Last
  15.  
  16. // Loop thru the logical partitions and remove any unused space over 50 MB
  17. Do While IsLogical
  18.      If GetUnusedAmount > 50 Then
  19.           Resize Smaller GetUnusedAmount - 50
  20.           Move Right Max
  21.      End If
  22.      Select Partition Previous
  23. Loop
  24.  
  25. // Resize the extended partition to fit the logical partitions
  26. Select Partition Extended
  27. Resize Left Boundary Min
  28.  
  29. // Expand the primary partition to include the unused space
  30. Select Partition Previous
  31. Resize Larger Max
  32.